
export function adapterDraft(designDraftWidth) {
    window.addEventListener('DOMContentLoaded', Resize, false);
    window.addEventListener('resize', Resize, false);
    function Resize() {
        let sw = window.screen.width;
        let dw = Number(designDraftWidth);
        let scale = sw / dw;
        document.documentElement.style.fontSize = scale + 'px';
    }
}

export function adapterDraftPartApply(designDraftWidth) {
    window.addEventListener('DOMContentLoaded', Resize, false);
    window.addEventListener('resize', Resize, false);
    function Resize() {
        let sw = window.screen.width;
        let dw = Number(designDraftWidth);
        let scale = sw / dw;
        var r = document.querySelector(":root");
        r.style.setProperty("--adapter-fontSize", scale + 'px');
    }
}